import java.io.*;
import java.lang.Object;
import java.awt.Point;
import java.awt.Color;

public class Tri boolean equals(Object obj)
{
	if(! (obj instanceof Triangle)) {return false;}
	Triangle.otherTriangle = (Triangle) obj;
	return (p1.equals(otherTriangle.p1) && p2.equals(otherTriangle.p2) && p3.equals(otherTriangle.p3));
}
public static void main(String[] ar)
{
	Triangle t = new Triangle(new Point(0,0), new Point(1,1), new Point(2,2));
	ColoredTriangle ct = new ColoredTriangle(Color.red, new Point(0,0),new Point(1,1), new Point(2,2));
	System.out.println(t.equals(ct));
	System.out.println(ct.equals(t));
}

